class rect {
  num x;
  num y;
  num width;
  num height;
  
  num get left() => x;
      set left(num value) => x = value;
  num get top() => y;
      set top(num value) => y = value;
  num get right() => x + width;
      set right(num value) => x = value - width;
  num get bottom() => y + height;
      set bottom(num value) => y = value - height;

  rect(this.x, this.y, this.width, this.height);
  rect.ltrb(this.left, this.top, this.right, this.bottom);
  rect.empty() {
    x = 0;
    y = 0;
    width = 0;
    height = 0;
  }
}
